package gl.pk.cmd;

import gl.java.umsp.ErrCode;

public enum CMD {

    Login(1000, "Login"),

    Logout(1002, "Logout"),

    Run(2000, "Move"),
    Walk(2002, "Move"),
    Riding(2004, "Move"),

    Attack(3000, "Attack"),
    Magic(3002, "Magic"),

    Pick(4000, "Pick"),
    Drop(4002, "Drop"),

    Bron(5000, "Bron"),
    Die(5002, "Die"),

    HP(5004, "HP changed"),
    MP(5006, "MP changed"),
    Buffer(5008, "Buffer changed"),


    RoomOrUserInvalid(603, "匹配失败,用户或者房间信息被修改已无效,请重试"),
    RoomSerViceOffline(604, "房间服务不在线"),
    UserMatchIsFrequency(605, "匹配太频繁,请稍后重试"),
    UserHasInRoom(606, "用户已经在房间中"),
    UserIsOffline(607, "用户已经从GateWay离线"),


    ServiceBusy(503, "服务器忙,请稍后重试"),
    MatchNoHandler(510, "没有匹配Handler"),

    ;


    private final String describe;
    private final int code;

    CMD(int code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    public String getDescribe() {
        return describe;
    }

    public int getCode() {
        return code;
    }

    @Override
    public String toString() {
        return  "[" + code + "]("+ describe+")" ;
    }


}